from Function import *
import tkinter as tk
# def welcome():
#     print("***-----------------------------------------------------------------------***")
#     print("                            Welcome to                                       ")
#     print("                                    21智科2班 银行                             ")
#     print()
#     print("***-----------------------------------------------------------------------***")
def bankStartMenu():
    # open_time = int(input(("请输入银行打开时间：")))
    # close_time = int(input(("请输入银行关闭时间：")))

    root = tk.Tk()
    root.title("银行模拟系统界面")

    # 设置标签信息
    label1 = tk.Label(root, text='银行营业时间(h)：')
    label1.grid(row=0, column=0)
    label2 = tk.Label(root, text='银行歇业时间(h)：')
    label2.grid(row=1, column=0)

    # 创建输入框
    entry1 = tk.Entry(root)
    entry1.grid(row=0, column=1, padx=10, pady=5)
    entry2 = tk.Entry(root)
    entry2.grid(row=1, column=1, padx=10, pady=5)

    # 创建按键
    def show():
        print('银行营业时间：%s' % entry1.get())
        print('银行歇业时间：%s' % entry2.get())
        #global open_time, close_time
        open_times = entry1.get()
        close_times = entry2.get()
        open_time=int(open_times)
        close_time=int(close_times)
        return startWorking(open_time, close_time)

    button1 = tk.Button(root, text='开始模拟', command=show).grid(row=3, column=0, sticky=tk.W, padx=30, pady=5)
    button2 = tk.Button(root, text='退出模拟', command=root.quit).grid(row=3, column=1, sticky=tk.E, padx=30, pady=5)

    tk.mainloop()



    # select1 = 1
    # while select1 != 2:
    #     bankMenu()
    #     # select1 = int(input("请输入你的选择："))
    #     if select1 == 1:
    #         # os.system("cls")
    #         startWorking(open_time,close_time)
    #         break

# def bankMenu():
#     os.system("cls" )#清屏，即切换界面
#     print("===========================================================================" )
#     print('|                                                                         |')
#     print('|                                                                         |')
#     print('|                                                                         |')
#     print("                           输入1开始模拟                                     ")
#     print("                           输入2退出")
#     print("===========================================================================" )

